package com.meihua.baoleyi.utils;

/**
 * Created by liming on 2017/10/16.
 */

public class RegularConstant {

    //长度必须大于8位
    public static final String RGX_LENGTH = "^.{8,}$";

    //全是英文字母
    public static final String RGX_ALL_LETTER = "[a-zA-Z]+";

    //全是数字
    public static final String RGX_ALL_NUMBER = "[0-9]+";

    //不能是全是字母或者全是数字，且长度不能少于8位
    public static final String RGX_PASSWORD = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,}$";

    //身份证，15位或者18位，末尾可以是Xx
    public static final String RGX_IDEMTITY_CARD = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}$";

    //连续的数字的校验
    public static final String RGX_ORDER_NUM = "^(\\d)\1{2}((?<=0)1|(?<=1)2|(?<=2)3|(?<=3)4|(?<=4)5|(?<=5)6|(?<=6)7|(?<=7)8|(?<=8)9){2,}$";

    //连续字母的校验
    public static final String RGX_ORDER_LETTER = "^(?:(?!a[ac-z]|b[abd-z]|c[a-ce-z]|d[a-df-z]|e[a-eg-z]|f[a-fh-z]|g[a-gi-z]|h[a-hj-z]|i[a-ik-z]|j[a-jl-z]|k[a-km-z]|l[a-ln-z]|m[a-mo-z]|n[a-np-z]|o[a-oq-z]|p[a-pr-z]|q[a-qs-z]|r[a-rt-z]|s[a-su-z]|t[a-tv-z]|u[a-uw-z]|v[a-vxyz]|w[a-wyz]|x[a-xz]|y[a-y]|z[a-z]|0[02-9]|1[013-9]|2[0-24-9]|3[0-35-9]|4[0-46-9]|5[0-57-9]|6[0-689]|7[0-79]|8[0-8]|9[0-9])[a-z\\d])+$";

}
